package com.sparrow.rpc.socket.msg.resp;

import com.sparrow.rpc.socket.msg.RpcCodecMsg;
import com.sparrow.rpc.socket.msg.RpcMsgType;
import com.sparrow.rpc.socket.msg.vo.RpcNodeVo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * rpc 广播节点列表
 */
public class RpcNodeBroadcastResponse implements RpcCodecMsg, Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 目标节点id
     */
    private String targetNodeId;
    /**
     * 登录节点id
     */
    private String loginNodeId;
    /**
     * 节点列表
     */
    private List<RpcNodeVo> nodeList = new ArrayList<>();

    public String getTargetNodeId() {
        return targetNodeId;
    }

    public void setTargetNodeId(String targetNodeId) {
        this.targetNodeId = targetNodeId;
    }

    public String getLoginNodeId() {
        return loginNodeId;
    }

    public void setLoginNodeId(String loginNodeId) {
        this.loginNodeId = loginNodeId;
    }

    public List<RpcNodeVo> getNodeList() {
        return nodeList;
    }

    public void setNodeList(List<RpcNodeVo> nodeList) {
        this.nodeList = nodeList;
    }

    @Override
    public int getType() {
        return RpcMsgType.NODE_BROADCAST_RESP.getTypeId();
    }
}
